<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <title>参数设置 / 用户计划-编辑用户计划</title>
  <link rel="stylesheet" href="../../../css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="../../../css/common-layer.css"/>
    <style>
    	.layui-form-item{margin-bottom: 10px;}
    	.layui-form-select dl{max-height: 187px;}
    	.layui-form-item .layui-input-inline{width: 460px !important;}
		.layui-form-item .layui-input-inline1{width: auto !important;border: none;}
		.lableName{float: left; height: 38px;line-height: 38px;padding-right:0px;width: 160px;}
		.layui-form-item .w140{width: 140px !important;}
		.layui-form-item .w120{width:120px !important;}
		/********start 覆盖laydate默认样式,用于显示小时和分钟********/
		.layui-laydate-content>.layui-laydate-list {
			padding-bottom: 0px;
			overflow: hidden;
		}
		.layui-laydate-content>.layui-laydate-list>li{
			width:50%
		}
		/********end 覆盖laydate默认样式,用于显示小时和分钟********/
		.layui-field-title{margin: 0;padding-top: 10px;}
		.times{margin-top: 20px;}
		.layui-tab-title li {min-width:30px;padding: 0 10px；width:40px;}
		.red{color: #FF0000;}
		.layui-table td, .layui-table th {
		    text-align: center;
		}
    </style>
  </head>
  <body style="background: #fff;overflow-x:hidden ;" class="innerBody">
  
  <form class="layui-form layui-form-pane ml30" action="" id="formHtml" style="width: ;margin-top: 20px;" lay-filter="updForm">
    <div class="layui-form-item">
      <div class="layui-inline">
        <label class="layui-form-label label-120">门禁计划名称</label>
        <div class="layui-input-inline">
          <input type="text" name="" lay-verify="required" autocomplete="off" class="layui-input" placeholder="门禁计划名称">
        </div>
      </div>
    </div>
    <div class="layui-form-item">
      <div class="layui-inline">
        <label class="layui-form-label label-120">循环周期</label>
        <div class="layui-input-inline" style="height: 36px; border:1px solid #e6e6e6;">
    	  <input name="" title="全选/全不选" value="" type="checkbox" lay-filter="ischeckAll" lay-skin="primary">
        </div>
      </div>
    </div>
	<div class="layui-form-item">
	  <div class="layui-inline">
		  <div class="layui-tab">
		    <ul class="layui-tab-title">
		      <li class="layui-this"><input name="model[1]" title="星期一" value="" type="checkbox" lay-filter="model" lay-skin="primary"></li>
		      <li> <input name="model[2]" title="星期二" value="" type="checkbox" lay-filter="model" lay-skin="primary"></li>
		      <li><input name="model[3]" title="星期三" value="" type="checkbox" lay-filter="model" lay-skin="primary"></li>
		      <li><input name="model[4]" title="星期四" value="" type="checkbox" lay-filter="model" lay-skin="primary"></li>
		      <li><input name="model[5]" title="星期五" value="" type="checkbox" lay-filter="model" lay-skin="primary"></li>
			  <li><input name="model[5]" title="星期六" value="" type="checkbox" lay-filter="model" lay-skin="primary"></li>
			  <li><input name="model[5]" title="星期日" value="" type="checkbox" lay-filter="model" lay-skin="primary"></li>
			  <li><input name="model[5]" title="节假日" value="" type="checkbox" lay-filter="model" lay-skin="primary"></li>
		    </ul>
			<!-- 时间段TAb开始 -->
		    <div class="layui-tab-content">
		      <div class="layui-tab-item layui-show">
		        <!-- 时间段 -->
		        <div class="times" time='1'>
		        	<fieldset class="layui-elem-field layui-field-title">
		        	  <legend style="font-size: 15px;">时间段1</legend>
		        	</fieldset>
		        	<div class="layui-form-item">
		        	    <div class="layui-inline">
		        			<label class="layui-form-label">开始时间</label>
		        			<div class="layui-input-inline  w120">
		        			  <input type="text"  autocomplete="off" class="layui-input layui-input_" placeholder="时间" name="date" id="date">
		        			</div>
		        		</div>
		        		<div class="layui-inline">
		        			<label class="layui-form-label">结束时间</label>
		        			<div class="layui-input-inline  w120">
		        			  <input type="text"  autocomplete="off" class="layui-input layui-input_" placeholder="时间" name="date" id="date1">
		        			</div>
		        		</div>
		        		<div class="layui-inline">
		        			<label class="layui-form-label">开门方式</label>
		        			<div class="layui-input-inline w120">
		        				<select name="" lay-filter="">
		        					<option value="0" selected="selected">刷卡开门</option>
		        					<option value="1">敞开</option>
		        					<option value="2">常闭</option>
		        				</select>
		        			</div>
		        		</div>
		        	</div>
		        </div> 
		      </div>
		      <div class="layui-tab-item">内容2</div>
		      <div class="layui-tab-item">内容3</div>
		      <div class="layui-tab-item">内容4</div>
		      <div class="layui-tab-item">内容5</div>
		    </div>
		  </div>
		  <!-- 时间段TAb结束 -->
		  
	  </div>
	</div>
	  
	
    <div class="layui-form-item  window-block-btn">
      <div class="layui-input-block">
      	<button type="button" class="layui-btn layui-btn-primary window-btn" id="canleBtn">取消</button>
        <button type="button" class="layui-btn window-btn" lay-submit="" lay-filter="confirmBtn">确定</button>
        
      </div>
   	</div>
  </form>
  
  
  </body>
  
  <script src="../../../layui.all.js"></script>
  <script src="../../../js/common.js" type="text/javascript" charset="utf-8"></script>
  <script type="text/javascript">
  	 //主动加载jquery模块
  	layui.use(['jquery', 'layer','laydate'], function(){
  		var $ = layui.jquery //重点处
  		,laydate = layui.laydate
		,form = layui.form
  		,layer = layui.layer;
  		//得到父页面的id值
  		var index = (window.parent.index_);
  		console.log(index);
		//时间控件
		laydate.render({
			elem:'#date',
			type:'time' ,
			trigger: 'click',
			format:'HH:mm',//显示格式：小时：分钟
			min:'00:00:00',
			max: '23:59:00',
			value:'00:00'
		});
		laydate.render({
			elem:'#date1',
			type:'time' ,
			trigger: 'click',
			format:'HH:mm',//显示格式：小时：分钟
			min:'00:00:00',
			max: '23:59:00',
			value:'00:00'
		});
		//监听 勾选的方案类型，来控制短信模板配置的显示隐藏
		form.on('checkbox(notice)', function(data){
			//console.log(data.value+data.elem.checked); //复选框value值，也可以通过data.elem.value得到
			
		});
		
  		layui.use('form', function(){  
  		 	var form = layui.form;
  		 	//------确认添加-------
  			form.on('submit(confirmBtn)', function (data) {
  			    var obj = data.field;
  			    console.log(obj);
  			    //以下是ajax
  			    
  			    /*添加成功之后，关闭弹窗，刷新父页面*/
  			    parent.layer.close(index);//关闭layer
  			    $('#iframe',parent.document).attr('src', 'html/waterFee-mgt/notice-set/notice-set.html');
  			});
  			//取消
  			$("body").on("click","#canleBtn",function(){
  				parent.layer.close(index);//关闭layer
  			})
  			
  		})	
  	})
     
  </script>
  </html>